<template>
<div class="father">
        <div class="back" @click="push">
        <img src="@/assets/img/返回.png" alt="" />
        <span style="font-size:35px;">批改作业</span>
      </div>
    <div class="son01">
         <h3 style="font-size:26px">学生姓名：{{taskManager.studentName}}</h3>
    <div style="margin-top: 30px;">
        <p class="biaoti">作业题目：
            <span>{{taskManager.taskName}}</span>
        </p>
        <p class="daan">作业答案：
            <div>
                <el-form-item>
                    <span style="font-size: 16px;" >作业：</span>
                    <!-- <el-input type="textarea" style="width: 80%; font-size: 16px;" rows="14" placeholder="请输入题目答案" v-model="task.taskInfo"/> -->
                    <wangEditor @update="update" v-model="taskManager.taskTxt"/>
                </el-form-item>
                {{taskManager.taskTxt}}
                
            </div>
        </p>
    </div>
    <div>
        评分：<el-input v-model="input" placeholder="请输入评分" style="width: 100px"></el-input> <br/>
        评语：<el-input v-model="input" placeholder="请输入评语"></el-input>
    </div>
    <button style="width: 100px;height:35px;margin-top:40px">提交</button>
    </div>
</div>
</template>
<script setup>
import { ref, reactive,onMounted } from 'vue'
import route from "@/router";
import  {selecttaskManagerByid} from "@/api/teacher/taskManager.js";
//引入封装好的富文本编辑器
import wangEditor from '@/components/wangEditor.vue';
//监听富文本内容
const update = (content) => {

}
//返回上一页
const push = () => {
  route.push("/class/homework");
};
//查询的信息对象
const taskManager=ref({})
const selectOne=()=>{
    selecttaskManagerByid(9).then(res=>{
        console.log(res.data)
        taskManager.value=res.data;
    })
}
onMounted(()=>{
    selectOne();
})
</script>


<style lang='scss' scoped>
.father{
    margin: 0 auto;
    width: 100%;
    height: 100%;
    background-color: white;
}
.son01{
     margin: 0 auto;
    width: 80%;
    height: 100%;
    background-color: white;
    margin-top: 50px;
}
.back {
        width: 200px;
        height: 50px;
        //   background-color: bisque;
        cursor: pointer;
        display: flex;
        img {
         width: 30%;
        }
    }
.biaoti{
    border: 1px solid lightgray;
    margin-top: 20px;
    font-size: 24px;
    box-shadow: 1px 1px 2px 2px lightgray;
}
.daan{
    border: 1px solid lightgray;
    margin-top: 20px;
    height: 200px;
    font-size: 24px;
    margin-bottom: 20px;
}
</style>